<?php

class ClickTable extends Doctrine_Table
{
    /**
     * Count the clicks obtained by the selected Campaign
     * @param integer $campaignId
     * @return integer
     */
     public function countClicksForCampaign($campaignId){
        $q = $this->createQuery('c')->where('c.campaign_id = ?', $campaignId);
        return $q->count();
    }
}
